﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

namespace MessagePack.Formatters
{
	// Token: 0x0200001B RID: 27
	internal class Grouping<TKey, TElement> : IGrouping<TKey, TElement>, IEnumerable, IEnumerable<TElement>
	{
		// Token: 0x0600005F RID: 95 RVA: 0x00002DE4 File Offset: 0x000011E4
		public Grouping(TKey key, IEnumerable<TElement> elements)
		{
			this.key = key;
			this.elements = elements;
		}

		// Token: 0x17000006 RID: 6
		// (get) Token: 0x06000060 RID: 96 RVA: 0x00002DFA File Offset: 0x000011FA
		public TKey Key
		{
			get
			{
				return this.key;
			}
		}

		// Token: 0x06000061 RID: 97 RVA: 0x00002E02 File Offset: 0x00001202
		public IEnumerator<TElement> GetEnumerator()
		{
			return this.elements.GetEnumerator();
		}

		// Token: 0x06000062 RID: 98 RVA: 0x00002E0F File Offset: 0x0000120F
		IEnumerator IEnumerable.GetEnumerator()
		{
			return this.elements.GetEnumerator();
		}

		// Token: 0x04000015 RID: 21
		private readonly TKey key;

		// Token: 0x04000016 RID: 22
		private readonly IEnumerable<TElement> elements;
	}
}
